# $Id: PKGBUILD 69710 2012-04-22 22:27:47Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Claudio Riva <firetux83@gmail.com>

pkgname=pdfmod
pkgver=0.9.1
pkgrel=4
pkgdesc="Simple application for modifying PDF written in C Sharp"
arch=('any')
url="http://live.gnome.org/PdfMod"
license=('GPL' 'MIT')
depends=('gconf-sharp' 'poppler-glib' 'desktop-file-utils' 'hicolor-icon-theme' 'xdg-utils')
makedepends=('hyena' 'poppler-sharp' 'intltool' 'gnome-doc-utils')
install=$pkgname.install
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
        pdfmod-mono-2.10.patch
        LICENSE-PDFsharp)
sha256sums=('eb7c987514a053106ddf03f26544766c751c801d87762909b36415d46bc425c9'
            'f606f29f881f7171b43fed97aab58c1e1f5b78aa96e33d1c43e2526736651acd'
            '5d2b6e1a9e5582f9c5d129f222ff01ca6ce3dfa4a5c1f5c41ba827fe0fbeb4bd')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # https://bugzilla.gnome.org/show_bug.cgi?id=644516
  patch -Np1 -i "$srcdir/pdfmod-mono-2.10.patch"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
              --disable-scrollkeeper
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install

  install -Dm644 "$srcdir/LICENSE-PDFsharp" "$pkgdir/usr/share/licenses/$pkgname/LICENSE-PDFsharp"
}
